import React from 'react'
import { Space, Table, Button, Modal, Form, Input, DatePicker } from 'antd';

export default function Add() {
  const onFinish = (values) => {
    console.log('Success:', values);
  };
  const onFinishFailed = (errorInfo) => {
    console.log('Failed:', errorInfo);
  };
  return (
    <>

      <Form
        name="basic"
        labelCol={{
          span: 6,
        }}
        wrapperCol={{
          span: 16,
        }}
        initialValues={{
          remember: true,
        }}

        onFinish={onFinish}
        onFinishFailed={onFinishFailed}
        autoComplete="off"
      >
        <Form.Item
          label="名称"
          name="name"
          rules={[{ required: true, message: '请输入商品名称!' }]}
        >
          <Input style={{ width: '400px' }} />
        </Form.Item>
        <Form.Item
          label="生产日期"
          name="data"
          rules={[{ required: true, message: '请输入生产日期!' }]}
        >
          <DatePicker style={{ width: '400px' }} />
        </Form.Item>
        <Form.Item
          label="价格"
          name="price"
          rules={[{ required: true, message: '请输入价格!' }]}
        >
          <Input style={{ width: '400px' }} />
        </Form.Item>
        <Form.Item
          label="入库时间"
          name="time"
          rules={[{ required: true, message: '请输入价格!' }]}
        >
          <DatePicker style={{ width: '400px' }} />
        </Form.Item>
        <Form.Item
          label="产地"
          name="area"
          rules={[{ required: true, message: '请输入价格!' }]}
        >
          <Input style={{ width: '400px' }} />
        </Form.Item>
        <Form.Item
          label="描述"
          name="price"
          rules={[{ required: true, message: '请输入价格!' }]}
        >
          <Input style={{ width: '400px' }} />
        </Form.Item>
        <Form.Item
          wrapperCol={{
            offset: 8,
            span: 16,
          }}
        >
          <Button type="primary" htmlType="submit">
            添加
          </Button>
        </Form.Item>
      </Form>
    </>
  )
}
